;(function(argument) {
	//这里实现了对移动端rem的兼容，响应横屏竖屏最小rem判断和软键盘抬起时候不进行rem响应


	var SCREENTYPE = 'orientationchange' in window ? 'orientationchange' : 'resize';
	var DEFINENUMBER = 10;
	var gg = document.documentElement;
	var LASTNUMBER = gg.clientHeight;
	var LASWIDTHER = gg.clientWidth;



	function setView(){
		
		var width = gg.clientWidth;
		// if(Math.abs(LASTNUMBER - gg.clientHeight) > 10 && LASWIDTHER == width){
		// 	console.log('bodong')
		// 	LASTNUMBER = gg.clientHeight;
		// 	return;
		// }else{
		// 	LASTNUMBER = gg.clientHeight;
		// 	// LASWIDTHER = gg.clientWidth;
		// }
		// if(gg.clientWidth  / gg.clientHeight > 0.8){
		// 	width =gg.clientHeight * 0.8;
		// }
		if(gg.clientWidth<1024){
			if(gg.clientWidth > 700){
				width = 700;
			}else if(gg.clientWidth < 320){
				width = 320;
			}	
		}else{
			width =gg.clientHeight * 0.6;
		}
		
		
		gg.style.fontSize = width / DEFINENUMBER + 'px';
		return arguments.callee;
	}
	window.addEventListener(SCREENTYPE,setView());
	document.addEventListener('touchstart',function (event) {  
		if(event.touches.length>1){  
			event.preventDefault();  
		}  
	})  
	var lastTouchEnd=0;  
	document.addEventListener('touchend',function (event) {  
		var now=(new Date()).getTime();  
		if(now-lastTouchEnd<=300){  
			event.preventDefault();  
		}  
		lastTouchEnd=now;  
	},false);
})();